<?php
namespace app\index\controller;

use app\BaseController;
use app\common\model\User;
use think\facade\Db;
use think\facade\View;

class Index extends BaseController
{
    public function index()
    {
        return '<style type="text/css">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} a{color:#2E5CD5;cursor: pointer;text-decoration: none} a:hover{text-decoration:underline; } body{ background: #fff; font-family: "Century Gothic","Microsoft yahei"; color: #333;font-size:18px;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.6em; font-size: 42px }</style><div style="padding: 24px 48px;"> <h1>:) </h1><p> 江西信息应用职业技术学院' . '<br/><span style="font-size:30px;color:blue">21载初心不改 - 你值得信赖的信息类职业学校</span></p></div>';
    }

    public function show($name = 'tRed')
    {
        $model = new User();
        $rs = $model->select();
        return View("", ["users" => $rs]);
    }

    public function display()
    {
        $rs = Db::name("user")->where("id", 4)->find();
        return json($rs);
    }

    public function form()
    {
        return View();
    }

    public function user()
    {
        // 接收post过来的所有数据
        $data = input("post.");
        return json($data);
        // halt($data);
    }
}
